package com.pheruagor.handmanager.storage.api {
    import com.pheruagor.handmanager.model.business.Member;

    /**
     * All classes that manage member storage must implement this interface
     */
    public interface MemberStorage {
        /**
         * Save the specified member
         *
         * @param member
         * 		the member to save
         */
        function saveMember(member:Member, onResult:Function = null, onFault:Function = null):void;

        /**
         * List all members from the specified club
         *
         * @param clubId
         * 		the id of the club that have the members to list
         */
        function listMembers(clubId:String, onResult:Function, onFault:Function = null):void;

        /**
         * Remove the specified member and all these activities
         *
         * @param member
         * 		the member to remove
         */
        function removeMember(member:Member, onResult:Function = null, onFault:Function = null):void;

        /**
         * Remove all the members from a specified club
         *
         * @param clubId
         * 		the id of the club that have the members to remove
         */
        function removeAllMembersFromClub(clubId:String, onResult:Function = null, onFault:Function = null):void;

        /**
         * Remove all the members from the storage
         */
        function removeAllMembers(onResult:Function = null, onFault:Function = null):void;
    }
}